export const SKY = "SKY";
export const GROUND = "GROUND";
export const THUNDER = "THUNDER";
export const MOUNTAIN = "MOUNTAIN";
export const FIRE = "FIRE";
export const WATER = "WATER";
export const WIND = "WIND";
export const POOL = "POOL";
// 卦名配置
const SKY_CONFIG = {
  id: SKY,
  name: "乾",
  appearance: "天",
};
const GROUND_CONFIG = {
  id: GROUND,
  name: "坤",
  appearance: "地",
};
const THUNDER_CONFIG = {
  id: THUNDER,
  name: "震",
  appearance: "雷",
};
const MOUNTAIN_CONFIG = {
  id: MOUNTAIN,
  name: "艮",
  appearance: "山",
};
const FIRE_CONFIG = {
  id: FIRE,
  name: "离",
  appearance: "火",
};
const WATER_CONFIG = {
  id: WATER,
  name: "坎",
  appearance: "水",
};
const WIND_CONFIG = {
  id: WIND,
  name: "巽",
  appearance: "风",
};
const POOL_CONFIG = {
  id: POOL,
  name: "兑",
  appearance: "泽",
};
export default new Map([
  [
    SKY, // 外卦
    {
      ...SKY_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["乾为天", "乾", "天"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["否"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["无妄"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["遁"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["同人"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["讼"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["姤"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["履"],
          },
        ],
      ]),
    },
  ],
  [
    GROUND, // 外卦
    {
      ...GROUND_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["泰"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["地为坤", "地", "坤"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["复"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["谦"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["明夷"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["师"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["升"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["临"],
          },
        ],
      ]),
    },
  ],
  [
    THUNDER, // 外卦
    {
      ...THUNDER_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["大壮"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["豫"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["震为雷", "震", "雷"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["小过"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["丰"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["解"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["恒"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["归妹"],
          },
        ],
      ]),
    },
  ],
  [
    MOUNTAIN, // 外卦
    {
      ...MOUNTAIN_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["大畜"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["剥"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["颐"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["山", "艮", "艮为山"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["贲"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["蒙"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["蛊"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["损"],
          },
        ],
      ]),
    },
  ],

  [
    FIRE, // 外卦
    {
      ...FIRE_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["大有"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["晋"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["噬磕"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["旅"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["离为火", "离", "火"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["未济"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["鼎"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["革"],
          },
        ],
      ]),
    },
  ],
  [
    WATER, // 外卦
    {
      ...WATER_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["需"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["比"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["屯"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["蹇"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["既济"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["水", "坎", "坎为水"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["井"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["节"],
          },
        ],
      ]),
    },
  ],
  [
    POOL, // 外卦
    {
      ...POOL_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["夬"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["萃"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["随"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["咸"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["革"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["困"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["大过"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["泽", '兑', '兑为泽'],
          },
        ],
      ]),
    },
  ],
  [
    WIND, // 外卦
    {
      ...WIND_CONFIG,
      children: new Map([
        // 内卦
        [
          SKY,
          {
            ...SKY_CONFIG,
            // id: `${SKY_CONFIG.id}-${SKY_CONFIG.id}`,
            result: ["小畜"],
          },
        ],
        [
          GROUND,
          {
            ...GROUND_CONFIG,
            // id: `${GROUND_CONFIG.id}-${GROUND_CONFIG.id}`,
            result: ["观"],
          },
        ],
        [
          THUNDER,
          {
            ...THUNDER_CONFIG,
            // id: `${THUNDER_CONFIG.id}-${THUNDER_CONFIG.id}`,
            result: ["益"],
          },
        ],
        [
          MOUNTAIN,
          {
            ...MOUNTAIN_CONFIG,
            // id: `${MOUNTAIN_CONFIG.id}-${MOUNTAIN_CONFIG.id}`,
            result: ["渐"],
          },
        ],
        [
          FIRE,
          {
            ...FIRE_CONFIG,
            // id: `${FIRE_CONFIG.id}-${FIRE_CONFIG.id}`,
            result: ["家人"],
          },
        ],
        [
          WATER,
          {
            ...WATER_CONFIG,
            // id: `${WATER_CONFIG.id}-${WATER_CONFIG.id}`,
            result: ["涣"],
          },
        ],
        [
          WIND,
          {
            ...WIND_CONFIG,
            // id: `${WIND_CONFIG.id}-${WIND_CONFIG.id}`,
            result: ["风", "巽为风", "巽"],
          },
        ],
        [
          POOL,
          {
            ...POOL_CONFIG,
            // id: `${POOL_CONFIG.id}-${POOL_CONFIG.id}`,
            result: ["中孚"],
          },
        ],
      ]),
    },
  ],
]);
